package com.osmino.contacts.search;

import java.util.List;
import com.osmino.contacts.entity.Contact;
import com.osmino.contacts.entity.Email;

final class AsyncDublicatesEmailSearcher extends AsyncDublicatesSearcher {

	public AsyncDublicatesEmailSearcher(ISearchDublicateController controller, List<Contact> contacts) {
		super(controller, contacts);
	}

	@Override
	protected void fillConstraintList(Contact contact, List<String> constraintList) {
		for (Email email : contact.getEmails()) {
			constraintList.add(email.address);
		}
	}

}
